import request from '@/utils/request'

//系统管理-管理员列表
export function listAdmin(query){
    return request({
        url:'/admin/list',
        method:'get',
        params:query
    })
}

//系统管理-新增管理员
export function createAdmin(data){
    return request({
        url:'/admin/create',
        method:'post',
        data
})
}

//系统管理-修改管理员
export function updateAdmin(data){
    return request({
        url:'/admin/update',
        method:'post',
        data
})
}

//系统管理-删除管理员
export function deleteAdmin(data){
    return request({
        url:'/admin/delete',
        method:'post',
        data
})
}

export function roleOptions(query){
    return request({
        url:'/role/options',
        method:'get',
        params:query
    })
}

const uploadPath = process.env.BASE_API + '/storage/create'
export { uploadPath }